<script>
export default {
  name: "RenderItem",

  props: {
    id: String,
    item: Object,
  },
  render: function (h) {
    // if (this.item.type == "box") {
    //   return h(this.item.tag, this.item.data, this.$slots.default);
    // }

    let self = this;
    return h(
      this.item.tag,
      {
        domProps: {
          value: this.tempValue,
        },
        on: {
          click() {
            console.log(self.item);
            self.$bus.emit("current", self.item);
          },
          input: function (value) {
            self.$emit("input", value);
          },
        },
      },
      this.item.text,
      this.$slots.default
    );
  },
};
</script>
